package org.jeecg.modules.demo.zyExam.zypaperperson.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.zyExam.zyexamaddpaper.entity.ZyExamAddPaper;
import org.jeecg.modules.demo.zyExam.zypaperperson.entity.ZyPaperPerson;
import org.jeecg.modules.demo.zyExam.zypaperperson.service.IZyPaperPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;


/**
 * @Description: 试卷和人中间表
 * @Author: jeecg-boot
 * @Date: 2024-01-11
 * @Version: V1.0
 */
@Tag(name = "试卷和人中间表")
@RestController
@RequestMapping("/zypaperperson/zyPaperPerson")
@Slf4j
public class ZyPaperPersonController extends JeecgController<ZyPaperPerson, IZyPaperPersonService> {
    @Autowired
    private IZyPaperPersonService zyPaperPersonService;


    /**
     * 分页列表查询
     *
     * @param zyPaperPerson
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    //@AutoLog(value = "试卷和人中间表-分页列表查询")
    @Operation(summary = "试卷和人中间表-分页列表查询", description = "试卷和人中间表-分页列表查询")
    @GetMapping(value = "/list")
    public Result<IPage<ZyPaperPerson>> queryPageList(ZyPaperPerson zyPaperPerson,
                                                      @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                      HttpServletRequest req) {
        QueryWrapper<ZyPaperPerson> queryWrapper = QueryGenerator.initQueryWrapper(zyPaperPerson, req.getParameterMap());
        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        System.out.println("loginUser = " + loginUser);
        String realname = loginUser.getRealname();
        String role = loginUser.getRoleCode();
        if (!role.equals("admin")){
//        boolean flag = zyPaperPersonService.getByName(realname);
//        System.out.println(flag);
            queryWrapper.lambda().eq(ZyPaperPerson::getName, realname);
        }
        Page<ZyPaperPerson> page = new Page<ZyPaperPerson>(pageNo, pageSize);
        IPage<ZyPaperPerson> pageList = zyPaperPersonService.page(page, queryWrapper);
        return Result.OK(pageList);
    }

    /**
     * 添加
     *
     * @param zyPaperPerson
     * @return
     */
    @AutoLog(value = "试卷和人中间表-添加")
    @Operation(summary = "试卷和人中间表-添加", description = "试卷和人中间表-添加")
    @RequiresPermissions("zypaperperson:zy_paper_person:add")
    @PostMapping(value = "/add")
    public Result<String> add(@RequestBody ZyPaperPerson zyPaperPerson) {
//		String siteId = String.valueOf(redisUtil.get("siteId"));
//		zyPaperPerson.setSiteId(siteId);
        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String username = loginUser.getRealname();
        System.out.println("loginUser = " + loginUser);
        zyPaperPerson.setName(username);
        zyPaperPersonService.save(zyPaperPerson);
        return Result.OK("添加成功！");
    }

    /**
     * 成绩更新成功
     *
     * @param zyPaperPerson
     * @return
     */
    @AutoLog(value = "试卷和人中间表-editByNameAndPaperId")
    @Operation(summary = "试卷和人中间表-editByNameAndPaperId", description = "试卷和人中间表-editByNameAndPaperId")
    @RequiresPermissions("zypaperperson:zy_paper_person:edit")
    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
    public Result<String> editByNameAndPaperId(@RequestBody ZyPaperPerson zyPaperPerson) {
        String s = zyPaperPersonService.editByNameAndPaperId(zyPaperPerson);
        return Result.OK(s);
    }


    @AutoLog(value = "试卷和人中间表-添加所有人")
    @Operation(summary = "试卷和人中间表-添加所有人", description = "试卷和人中间表-添加所有人")
//	@RequiresPermissions("zypaperperson:zy_paper_person:add")
    @PostMapping(value = "/addAll")
    public Result<String> addAll(@RequestBody ZyExamAddPaper zyExamAddPaper) {
        System.out.println("zyExamAddPaper.getMutilChoiceQuestionNumber() = " + zyExamAddPaper.getMutilChoiceQuestionNumber());
        zyPaperPersonService.saveAll(zyExamAddPaper);
        return Result.OK("添加成功！");
    }

//    /**
//     * 编辑
//     *
//     * @param zyPaperPerson
//     * @return
//     */
//    @AutoLog(value = "试卷和人中间表-编辑")
//    @ApiOperation(value = "试卷和人中间表-编辑", notes = "试卷和人中间表-编辑")
////	@RequiresPermissions("zypaperperson:zy_paper_person:edit")
//    @RequestMapping(value = "/edits", method = {RequestMethod.PUT, RequestMethod.POST})
//    public Result<String> edit(@RequestBody ZyPaperPerson zyPaperPerson) {
//        zyPaperPersonService.updateById(zyPaperPerson);
//        return Result.OK("编辑成功!");
//    }

    /**
     * 编辑
     *
     * @param zyPaperPerson
     * @return
     */
    @AutoLog(value = "试卷和人中间表-编辑")
    @Operation(summary = "试卷和人中间表-编辑", description = "试卷和人中间表-编辑")
    @RequiresPermissions("zypaperperson:zy_paper_person:edit")
    @RequestMapping(value = "/edits", method = {RequestMethod.PUT, RequestMethod.POST})
    public Result<Map> edit(@RequestBody ZyPaperPerson zyPaperPerson) {
        Map<String, Object> map = new HashMap<>();
        map.put("paperCode", zyPaperPerson.getPaperId());
        map.put("id", zyPaperPerson.getId());
        System.out.println("zyPaperPerson = " + zyPaperPerson);
        return Result.OK(map);
    }

    /**
     * 通过id删除
     *
     * @param id
     * @return
     */
    @AutoLog(value = "试卷和人中间表-通过id删除")
    @Operation(summary = "试卷和人中间表-通过id删除", description = "试卷和人中间表-通过id删除")
    @RequiresPermissions("zypaperperson:zy_paper_person:delete")
    @RequestMapping(value = "/delete")
    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
        zyPaperPersonService.removeById(id);
        return Result.OK("删除成功!");
    }

    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
    @AutoLog(value = "试卷和人中间表-批量删除")
    @Operation(summary = "试卷和人中间表-批量删除", description = "试卷和人中间表-批量删除")
    @RequiresPermissions("zypaperperson:zy_paper_person:deleteBatch")
    @DeleteMapping(value = "/deleteBatch")
    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
        this.zyPaperPersonService.removeByIds(Arrays.asList(ids.split(",")));
        return Result.OK("批量删除成功!");
    }

//    /**
//     * 通过id查询
//     *
//     * @param id
//     * @return
//     */
//    //@AutoLog(value = "试卷和人中间表-通过id查询")
//    @ApiOperation(value = "试卷和人中间表-通过id查询", notes = "试卷和人中间表-通过id查询")
//    @RequestMapping(value = "/queryById")
//    public Result<String> queryById(@RequestParam(name = "id", required = true) String id) {
//        ZyPaperPerson zyPaperPerson = zyPaperPersonService.getById(id);
//        if (zyPaperPerson == null) {
//            return Result.error("未找到对应数据");
//        }
//        Gson gson = new Gson();
//        String json = gson.toJson(zyPaperPerson);
//        return Result.ok(json.toString());
//    }

    /**
     * 通过id查询
     *
     * @param id
     * @return
     */
//@AutoLog(value = "试卷和人中间表-通过id查询")
    @Operation(summary = "试卷和人中间表-通过id查询", description = "试卷和人中间表-通过id查询")
    @GetMapping(value = "/queryById")
    public Result<ZyPaperPerson> queryById(@RequestParam(name = "id", required = true) String id) {
        ZyPaperPerson zyPaperPerson = zyPaperPersonService.getById(id);
        if (zyPaperPerson == null) {
            return Result.error("未找到对应数据");
        }
        return Result.OK(zyPaperPerson);
    }


//    @ApiOperation(value = "试卷和人中间表-通过PaperCode查询", notes = "试卷和人中间表-通过PaperCode查询")
//    @RequestMapping(value = "/queryByPaperCode")
//    public Result queryByPaperCode(@RequestParam("paperId") String paperId) {
//        Object numbers[] = zyPaperPersonService.queryByPaperCode(paperId);
//        return Result.ok(numbers);
//    }
    @Operation(summary = "试卷和人中间表-通过PaperCode查询", description = "试卷和人中间表-通过PaperCode查询")
    @GetMapping(value ="/queryByPaperCode1")
    public Result<Map<String, Object>> queryByPaperCode1(@RequestParam("paperId")String paperId){
        Map<String, Object> map = zyPaperPersonService.queryByPaperCode1(paperId);
        return Result.ok(map);
    }


    /**
     * 导出excel
     *
     * @param request
     * @param zyPaperPerson
     */
    @RequiresPermissions("zypaperperson:zy_paper_person:exportXls")
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, ZyPaperPerson zyPaperPerson) {
        return super.exportXls(request, zyPaperPerson, ZyPaperPerson.class, "试卷和人中间表");
    }

    /**
     * 通过excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequiresPermissions("zypaperperson:zy_paper_person:importExcel")
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, ZyPaperPerson.class);
    }
}

//    @ApiOperation(value = "试卷和人中间表-通过id查询", notes = "试卷和人中间表-通过id查询")
//    @GetMapping(value = "/exportXls1")
//    protected ModelAndView exportXlsById(HttpServletRequest request) {
//        ZyPaperPerson zyPaperPerson=new ZyPaperPerson();
//        QueryWrapper<ZyPaperPerson> queryWrapper = QueryGenerator.initQueryWrapper(zyPaperPerson, request.getParameterMap());
//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//        String selections = request.getParameter("selections");
//        if (oConvertUtils.isNotEmpty(selections)) {
//            List<String> selectionList = Arrays.asList(selections.split(","));
//            queryWrapper.in("id",selectionList);
//        }
//        List<ZyPaperPerson> exportList = service.list(queryWrapper);
//
//
//        List<ZyPaperPersonEntity> dataList = new ArrayList<>();
//        for (int i = 0; i < exportList.size(); i++) {
//            ZyPaperPerson zyPaperPerson1 = exportList.get(i);
//            ZyPaperPersonEntity zyPaperPersonEntity=new ZyPaperPersonEntity();
//            BeanUtils.copyProperties(zyPaperPerson1, zyPaperPersonEntity);
//            String paperCode = zyPaperPerson1.getPaperId();
//            String mutilQuestionAnswer = zyPaperPerson1.getMutilQuestionAnswer();
//            String judgeQuestionAnswer = zyPaperPerson1.getJudgeQuestionAnswer();
//            String fillQuestionAnswer = zyPaperPerson1.getFillQuestionAnswer();
//
//
//            List<String> listA = mutilQuestionAnswer.chars()
//                    .mapToObj(c -> (char) (c + 'A' - '1'))
//                    .map(String::valueOf)
//                    .collect(Collectors.toList());
//            List<ZyPaperMultiQuestion> multiQuestionRes = zyPaperMultiQuestionService.findByIdAndType(paperCode);
//            for (int i1 = 0; i1 < multiQuestionRes.size(); i1++) {
//                if (!"E".equals(listA.get(i).toString())){
//                    multiQuestionRes.get(i1).setAnswer1(listA.get(i).toString());
//                }else{
//                    multiQuestionRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperMultiQuestionEntity> multiQuestionEntityList=new ArrayList<>();
//            for (ZyPaperMultiQuestion multiQuestionRes1 : multiQuestionRes) {
//                ZyPaperMultiQuestionEntity multiQuestionEntity = new ZyPaperMultiQuestionEntity();
//                BeanUtils.copyProperties(multiQuestionRes1, multiQuestionEntity);
//                multiQuestionEntityList.add(multiQuestionEntity);
//            }
//            System.out.println("multiQuestionEntityList = " + multiQuestionEntityList);
//
//
//            List<Character> listB = judgeQuestionAnswer.chars().mapToObj(c -> (char) c).collect(Collectors.toList());
//            List<ZyPaperJudgeQuestion> judgeQuestionRes = zyPaperJudgeQuestionService.findByIdAndType(paperCode);   //判断题题库 3
//            for (int i1 = 0; i1 < judgeQuestionRes.size(); i1++) {
//                if (listB.get(i1).toString().equals("T")){
//                    judgeQuestionRes.get(i1).setAnswer1("√");
//                }else if (listB.get(i1).toString().equals("F")){
//                    judgeQuestionRes.get(i1).setAnswer1("×");
//                }else if (listB.get(i1).toString().equals("C")){
//                    judgeQuestionRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperJudgeQuestionEmtity> judgeQuestionEmtityList=new ArrayList<>();
//            for (ZyPaperJudgeQuestion judgeQuestionRes1 : judgeQuestionRes) {
//                ZyPaperJudgeQuestionEmtity judgeQuestionEntity = new ZyPaperJudgeQuestionEmtity();
//                BeanUtils.copyProperties(judgeQuestionRes1, judgeQuestionEntity);
//                judgeQuestionEmtityList.add(judgeQuestionEntity);
//            }
//            System.out.println("judgeQuestionEmtityList = " + judgeQuestionEmtityList);
//
//            List<ZyPaperFillQuestion> fillQuestionsRes = zyPaperFillQuestionService.findByIdAndType(paperCode);     //填空题题库 2
//            List<String> listC = Arrays.stream(fillQuestionAnswer.split("@"))
//                    .map(s -> s.replace("^null", "").replace("^true", ""))
//                    .collect(Collectors.toList());
//            for (int i1 = 0; i1 < fillQuestionsRes.size(); i1++) {
//                if (!listC.get(i1).toString().equals("null")){
//                    fillQuestionsRes.get(i1).setAnswer1(listC.get(i1).toString());
//                }else {
//                    fillQuestionsRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperFillQuestionEntity> fillQuestionEntityList=new ArrayList<>();
//            for (ZyPaperFillQuestion fillQuestionsRes1 : fillQuestionsRes) {
//                ZyPaperFillQuestionEntity fillQuestionEntity = new ZyPaperFillQuestionEntity();
//                BeanUtils.copyProperties(fillQuestionsRes1, fillQuestionEntity);
//                fillQuestionEntityList.add(fillQuestionEntity);
//            }
//            System.out.println("fillQuestionEntityList = " + fillQuestionEntityList);
//
//            zyPaperPersonEntity.setMutilQuestionList(multiQuestionEntityList);
//            zyPaperPersonEntity.setFillQuestionList(fillQuestionEntityList);
//            zyPaperPersonEntity.setJudgeQuestionList(judgeQuestionEmtityList);
//            System.out.println("zyPaperPersonEntity = " + zyPaperPersonEntity);
//            dataList.add(zyPaperPersonEntity);
//        }
//        String title2 = "考试数据详情";
//        ModelAndView mv2 = new ModelAndView(new JeecgEntityExcelView());
//        mv2.addObject(NormalExcelConstants.FILE_NAME, title2);
//        mv2.addObject(NormalExcelConstants.CLASS, ZyPaperPersonEntity.class);
//        ExportParams exportParams2 = new ExportParams(title2 + "报表", "导出人:" + sysUser.getRealname(), title2);
//        exportParams2.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//        mv2.addObject(NormalExcelConstants.PARAMS, exportParams2);
//        mv2.addObject(NormalExcelConstants.DATA_LIST, dataList);
//        return mv2;
        // Step.1 合并数据
//        List<Object> dataList = new ArrayList<>();
//        dataList.addAll(multiQuestionRes);
//        dataList.addAll(fillQuestionsRes);
//        dataList.addAll(judgeQuestionRes);
//        Map<Integer, List<?>> map = new HashMap<>();
//        map.put(1,multiQuestionRes);
//        map.put(2,fillQuestionsRes);
//        map.put(3,judgeQuestionRes);
        //        // Step.2 获取导出数据
//        String title = "考试数据选择题详情";
//        // Step.3 AutoPoi 导出Excel
//        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
//        mv.addObject(NormalExcelConstants.FILE_NAME, title);
//        mv.addObject(NormalExcelConstants.CLASS, ZyPaperMultiQuestion.class);
//        ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
//        exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//        mv.addObject(NormalExcelConstants.PARAMS, exportParams);
//        mv.addObject(NormalExcelConstants.DATA_LIST, multiQuestionRes);
//
//        String title1 = "考试数据填空题详情";
//        ModelAndView mv1 = new ModelAndView(new JeecgEntityExcelView());
//        mv1.addObject(NormalExcelConstants.FILE_NAME, title);
//        mv1.addObject(NormalExcelConstants.CLASS, ZyPaperFillQuestion.class);
//        ExportParams exportParams1 = new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
//        exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//        mv1.addObject(NormalExcelConstants.PARAMS, exportParams);
//        mv1.addObject(NormalExcelConstants.DATA_LIST, fillQuestionsRes);
//
//        String title2 = "考试数据判断题详情";
//        ModelAndView mv2 = new ModelAndView(new JeecgEntityExcelView());
//        mv2.addObject(NormalExcelConstants.FILE_NAME, title2);
//        mv2.addObject(NormalExcelConstants.CLASS, ZyPaperJudgeQuestion.class);
//        ExportParams exportParams2 = new ExportParams(title2 + "报表", "导出人:" + sysUser.getRealname(), title2);
//        exportParams2.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//        mv2.addObject(NormalExcelConstants.PARAMS, exportParams2);
//        mv2.addObject(NormalExcelConstants.DATA_LIST, judgeQuestionRes);
//    }

//    @ApiOperation(value = "试卷和人中间表-通过123查询", notes = "试卷和人中间表-通过id查询")
//    @GetMapping(value = "/printByIdData")
//    protected Result printByIdData(@RequestParam("id") String id) {
//        ZyPaperPerson zyPaperPerson=new ZyPaperPerson();
//        QueryWrapper<ZyPaperPerson> queryWrapper = new QueryWrapper<>(zyPaperPerson);
//        queryWrapper.lambda().eq(ZyPaperPerson::getId,id);
//        List<ZyPaperPerson> exportList = service.list(queryWrapper);
//
//        List<ZyPaperPersonEntity> dataList = new ArrayList<>();
//        for (int i = 0; i < exportList.size(); i++) {
//            ZyPaperPerson zyPaperPerson1 = exportList.get(i);
//            ZyPaperPersonEntity zyPaperPersonEntity=new ZyPaperPersonEntity();
//            BeanUtils.copyProperties(zyPaperPerson1, zyPaperPersonEntity);
//            String paperCode = zyPaperPerson1.getPaperId();
//            String mutilQuestionAnswer = zyPaperPerson1.getMutilQuestionAnswer();
//            String judgeQuestionAnswer = zyPaperPerson1.getJudgeQuestionAnswer();
//            String fillQuestionAnswer = zyPaperPerson1.getFillQuestionAnswer();
//
//            List<String> listA = mutilQuestionAnswer.chars()
//                    .mapToObj(c -> (char) (c + 'A' - '1'))
//                    .map(String::valueOf)
//                    .collect(Collectors.toList());
//            List<ZyPaperMultiQuestion> multiQuestionRes = zyPaperMultiQuestionService.findByIdAndType(paperCode);
//            for (int i1 = 0; i1 < multiQuestionRes.size(); i1++) {
//                if (!"E".equals(listA.get(i).toString())){
//                    multiQuestionRes.get(i1).setAnswer1(listA.get(i).toString());
//                }else{
//                    multiQuestionRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperMultiQuestionEntity> multiQuestionEntityList=new ArrayList<>();
//            for (ZyPaperMultiQuestion multiQuestionRes1 : multiQuestionRes) {
//                ZyPaperMultiQuestionEntity multiQuestionEntity = new ZyPaperMultiQuestionEntity();
//                BeanUtils.copyProperties(multiQuestionRes1, multiQuestionEntity);
//                multiQuestionEntityList.add(multiQuestionEntity);
//            }
//            System.out.println("multiQuestionEntityList = " + multiQuestionEntityList);
//
//
//            List<Character> listB = judgeQuestionAnswer.chars().mapToObj(c -> (char) c).collect(Collectors.toList());
//            List<ZyPaperJudgeQuestion> judgeQuestionRes = zyPaperJudgeQuestionService.findByIdAndType(paperCode);   //判断题题库 3
//            for (int i1 = 0; i1 < judgeQuestionRes.size(); i1++) {
//                if (listB.get(i1).toString().equals("T")){
//                    judgeQuestionRes.get(i1).setAnswer1("√");
//                }else if (listB.get(i1).toString().equals("F")){
//                    judgeQuestionRes.get(i1).setAnswer1("×");
//                }else if (listB.get(i1).toString().equals("C")){
//                    judgeQuestionRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperJudgeQuestionEmtity> judgeQuestionEmtityList=new ArrayList<>();
//            for (ZyPaperJudgeQuestion judgeQuestionRes1 : judgeQuestionRes) {
//                ZyPaperJudgeQuestionEmtity judgeQuestionEntity = new ZyPaperJudgeQuestionEmtity();
//                BeanUtils.copyProperties(judgeQuestionRes1, judgeQuestionEntity);
//                judgeQuestionEmtityList.add(judgeQuestionEntity);
//            }
//            System.out.println("judgeQuestionEmtityList = " + judgeQuestionEmtityList);
//
//            List<ZyPaperFillQuestion> fillQuestionsRes = zyPaperFillQuestionService.findByIdAndType(paperCode);     //填空题题库 2
//            List<String> listC = Arrays.stream(fillQuestionAnswer.split("@"))
//                    .map(s -> s.replace("^null", "").replace("^true", ""))
//                    .collect(Collectors.toList());
//            for (int i1 = 0; i1 < fillQuestionsRes.size(); i1++) {
//                if (!listC.get(i1).toString().equals("null")){
//                    fillQuestionsRes.get(i1).setAnswer1(listC.get(i1).toString());
//                }else {
//                    fillQuestionsRes.get(i1).setAnswer1("未作答");
//                }
//            }
//            List<ZyPaperFillQuestionEntity> fillQuestionEntityList=new ArrayList<>();
//            for (ZyPaperFillQuestion fillQuestionsRes1 : fillQuestionsRes) {
//                ZyPaperFillQuestionEntity fillQuestionEntity = new ZyPaperFillQuestionEntity();
//                BeanUtils.copyProperties(fillQuestionsRes1, fillQuestionEntity);
//                fillQuestionEntityList.add(fillQuestionEntity);
//            }
//            System.out.println("fillQuestionEntityList = " + fillQuestionEntityList);
//
//            zyPaperPersonEntity.setMutilQuestionList(multiQuestionEntityList);
//            zyPaperPersonEntity.setFillQuestionList(fillQuestionEntityList);
//            zyPaperPersonEntity.setJudgeQuestionList(judgeQuestionEmtityList);
//            System.out.println("zyPaperPersonEntity = " + zyPaperPersonEntity);
//            dataList.add(zyPaperPersonEntity);
//        }
//        return Result.ok(dataList);

